home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
hardware
/
blizkick
/
modules
/
a1000jingle.asm
< prev
next >
Wrap
Assembly Source File
|
1999-05-17
|
24KB
|
586 lines
; FILE: Source:modules/A1000Jingle.ASM REV: 2 --- Play A1000 boot-jingle
;
; A1000-Jingle module for BlizKick
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Written by Harry Sintonen.
; This source code is Public Domain.
;
;
incdir "include:"
include "exec/libraries.i" ; Some required...
include "exec/memory.i"
include "hardware/custom.i"
include "hardware/dmabits.i"
include "hardware/intbits.i"
include "exec/exec_lib.i"
include "blizkickmodule.i"
SECTION MODULE,CODE
_DUMMY_LABEL
BK_MOD BKMF_SingleMode,_end,(RTF_COLDSTART)<<24+37<<16+NT_UNKNOWN<<8+104,_name,_idstr,_init
;BK_MOD BKMF_SingleMode,_end,(RTF_COLDSTART)<<24+37<<16+NT_UNKNOWN<<8+$FF,_name,_idstr,_init
; Singlemode on,
; COLDSTART module, requires KS V37.x or better, module type NT_UNKNOWN, priority 104.
SAM_LEN EQU 7470
SAM_FREQ EQU 8363
SAM_SAMPLES EQU SAM_LEN/2
SAM_PERIOID EQU 125000/SAM_FREQ*355871/10000
_init movem.l d0-a6,-(sp)
move.l (4).w,a6
lea $DFF000,a5
move.l #SAM_LEN,d0
moveq #MEMF_CHIP,d1
jsr (_LVOAllocMem,a6)
tst.l d0
beq .exit
move.l d0,a2
lea (Sample,pc),a0
move.l a2,a1
move.l #SAM_LEN,d0
jsr (_LVOCopyMem,a6)
move.w #INTF_AUD0!INTF_AUD1!INTF_AUD2!INTF_AUD3,(intena,a5) ; Disable audio ints
move.w #DMAF_AUD0!DMAF_AUD1!DMAF_AUD2!DMAF_AUD3,(dmacon,a5) ; Stop audio DMA
move.w #$00FF,(adkcon,a5) ; No modulation
moveq #0,d0 ; Volume to zero
lea (aud+ac_vol,a5),a0
bsr .setall
move.w #SAM_SAMPLES,d0 ; Set sample len
lea (aud+ac_len,a5),a0
bsr.b .setall
move.w #SAM_PERIOID,d0 ; Set sample perioid
lea (aud+ac_per,a5),a0
bsr.b .setall
move.l a2,(aud0+ac_ptr,a5) ; Set sample addr
move.l a2,(aud1+ac_ptr,a5)
move.l a2,(aud2+ac_ptr,a5)
move.l a2,(aud3+ac_ptr,a5)
moveq #64,d0 ; Set full volume
lea (aud+ac_vol,a5),a0
bsr.b .setall
move.w #INTF_AUD0!INTF_AUD1!INTF_AUD2!INTF_AUD3,(intreq,a5) ; Kill possible pending intreqs
; Enable audio DMA
move.w #DMAF_SETCLR!DMAF_AUD0!DMAF_AUD1!DMAF_AUD2!DMAF_AUD3!DMAF_MASTER,(dmacon,a5)
moveq #2-1,d0 ; Do two times (will play sample once)
.wait btst #INTB_AUD0,(intreqr+1,a5) ; Wait sample to finish
beq.b .wait
move.w #INTF_AUD0,(intreq,a5) ; Kill intreq
dbf d0,.wait
moveq #0,d0 ; Volume to zero
lea (aud+ac_vol,a5),a0
bsr.b .setall
move.w #DMAF_AUD0!DMAF_AUD1!DMAF_AUD2!DMAF_AUD3,(dmacon,a5) ; Stop audio DMA
move.w #INTF_AUD0!INTF_AUD1!INTF_AUD2!INTF_AUD3,(intreq,a5) ; Kill pending intreqs
move.l a2,a1
move.l #SAM_LEN,d0
jsr (_LVOFreeMem,a6)
.exit movem.l (sp)+,d0-a6
rts
.setall move.w d0,(a0)
move.w d0,(aud1-aud0,a0)
move.w d0,(aud2-aud0,a0)
move.w d0,(aud3-aud0,a0)
rts
Sample ;;INCBIN "a1000.raw"
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$00000000,$00000000
DC.L $00000000,$00000000,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0F0F0,$F0F0F0F0,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0F0F0,$ECE6DED8,$D6D4D2D2,$D2D2D2D2
DC.L $D8E4EAEC,$EEF0F0F0,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0F0EE,$E4DAD6D4,$D2D2D2D2,$D2D8E0E8
DC.L $ECEEF0F0,$F0F0F0F0,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0E8DE,$D8D4D2D2,$D2D2D2D6,$E2EAECEE
DC.L $F0F0F0F0,$F0F0F0F0,$F0F0F0F0,$F0F0F0EE
DC.L $E6DED8D4,$D2D2D2D2,$D2D2D6E0,$E8ECEEF0
DC.L $F0F0F0F0,$F0F0F0F0,$F0F0F0F0,$F0EEE6DC
DC.L $D6D4D2D2,$D2D2D2D2,$D8E0E8EA,$EEF0F0F0
DC.L $F0F0F0F0,$F0F0F0F0,$F0F0F0EC,$E6DCD6D4
DC.L $D2D2D2D2,$D2D2D6E2,$EAECF0F0,$F0F0F0F0
DC.L $F0F0F0F0,$F0F0F0F0,$F0F0EEE8,$E0D8D6D4
DC.L $D2D2D2D2,$DCE6EAEE,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0F0F0,$F0F0F0F0,$F0E8DCD6,$D4D2D2D2
DC.L $D2D4DCE4,$EAEEF0F0,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0F0F0,$F0F0ECE6,$DED8D6D4,$D2D2D2D4
DC.L $DAE2EAEC,$EEF0F0F0,$F0F0F0F0,$F0F0F0F0
DC.L $F0F0F0F0,$E8E2DAD6,$D4D2D2D2,$D2D2D6DE
DC.L $E8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